"""
Author: wenbin
Create: 2024-08-19
"""
from enum import Enum, unique


class Error(Enum):
    pass


@unique
class AuthError(Error):
    """
    权限错误 10000
    """
    NO_ACCESS_PERMISSION = {
        "code": 10000,
        "message": "没有访问权限"
    }


@unique
class UserError(Error):
    """
    用户错误 20000
    """
    USER_NOT_EXIST = {
        "code": 20000,
        "message": "用户不存在"
    }


@unique
class AppError(Error):
    """
    应用错误 30000
    """
    APP_NOT_EXISTS = {
        "code": 20000,
        "message": "应用不存在"
    }
